<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <title>Title</title>
</head>
<body>

<div id="app">
  <cpn></cpn>
  <cpn></cpn>
  <cpn></cpn>
</div>

<template id="cpn">
  <div>
    <h2>{{title}}</h2>
    <p>{{content}}</p>
  </div>
</template>

<script src="../js/vue.js"></script>
<script>
  //1. 注册一个全局组件。
  Vue.component('cpn', {
      template: '#cpn',
      data: function () {
        return {
          title: '我是标题',
          content: '我是内容, 哈哈哈'
        }
      }
    }
  );

  const app = new Vue({
    el: '#app',
    data: {
      message: 'Rae是我儿子！'
    }
  })
</script>

</body>
</html>